#ifndef CAMERAWINDOW_H
#define CAMERAWINDOW_H

#include <QMainWindow>
#include <QTimer>
#include <QImage>
#include <QMovie>
#include "v412api.h"

namespace Ui {
class CameraWindow;
}

class CameraWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit CameraWindow(QWidget *parent = nullptr);
    ~CameraWindow();
    void onUpdateUIData();
    void onUpdateUIDataTime();
    //显示动态背景
    void show_back_gif();

private slots:
    void on_start_or_stop_btn_clicked();

    void on_return_btn_clicked();

    void on_photograph_btn_clicked();

    void on_preview_btn_clicked();

private:
    Ui::CameraWindow *ui;
    V4l2Api *v4l2;//定义一个摄像头类的指针
    QTimer *m_timer;
    QTimer *Date_Time_timer;

    QImage saveImage;
    //摄像头的状态
    int flag = 0;
};

#endif // CAMERAWINDOW_H
